﻿using ChurchDiary.BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Reflection;
using System.Web.Mvc;
using ChurchDiary.TableEntity;

namespace ChurchWebsite.Areas.Administration.Controllers
{
    public class CommonAdministrationController : Controller
    {
        //
        // GET: /Administration/CommonAdministration/Languages
        #region Languages
        public ActionResult Languages()
        {
            return View();
        }
        public JsonResult GetLanguages(int PageNo, string SearchKey, string Sort, string SortMode, int PerPage)
        {
            return Json(new BLL_Shared().GetLanguages(PageNo, SearchKey, Sort, SortMode, PerPage), JsonRequestBehavior.AllowGet);
        }
        public JsonResult GetLanguage(Guid dataId)
        {
            return Json(new BLL_Shared().GetLanguage(dataId), JsonRequestBehavior.AllowGet);
        }
        public JsonResult AddLanguage(EntityLanguage Language)
        {
            return Json(new BLL_Shared().InsertLanguage(Language), JsonRequestBehavior.AllowGet);
        }
        public JsonResult UpdateLanguage(EntityLanguage Language)
        {
            return Json(new BLL_Shared().UpdateLanguage(Language), JsonRequestBehavior.AllowGet);
        }
        public JsonResult DeleteLanguage(Guid dataId)
        {
            return Json(new BLL_Shared().DeleteLanguage(dataId), JsonRequestBehavior.AllowGet);
        }
        #endregion

    }
}
